1. Field of the Invention
The present invention relates to a control apparatus of a machine tool and a method of controlling an operation of the machine tool. In particular, the present invention provides a preferable technique for use with a machine tool equipped with a manual pulse generator for a manual operation.
2. Description of the Related Art
At present, a numerical control (NC) method using an NC program is used as one of numerical control methods of machine tools. The NC program is a program that includes code systems such as G-code that represents commands for moving a spindle, a tool post, and so forth, T-code that represents commands for calling tools to be used, and M-code that represents auxiliary function commands. In the NC method, a numerical control unit (NC unit) of the machine tool reads the NC program one block (line) after another, interprets commands (NC code) in the block, and sequentially executes the commands.
In general, several operation modes are provided for the NC machine tool. For example, there are an “automatic operation mode” in which the machine tool automatically operates in accordance with the NC program, a “single block mode” in which the operation of the NC unit is stopped after one block of the NC program has been executed, a “manual pulse mode” in which the NC program is executed in conjunction with rotation of a handwheel for a manual pulse generator which is rotated by an operator, and so forth. The handwheel for the manual pulse generator is generally provided on an operation panel of the machine tool (for example, refer to Japanese Unexamined Patent Application Publication No. 2002-49413). There are also machine tools for which the handwheel can be separated from the operation panel while being connected to the operation panel with a cable so as to allow the operator to have the handwheel at hand for operation.
The single block mode is often used during the setup stage prior to the automatic operation since the operation based on the NC program can be checked for every single block. When operated with the single block mode selected, the NC unit automatically stops the operation thereof when one block of the NC program has been executed. This accordingly stops the movement of the spindle and the tool post. This allows the operator to stop the execution of the NC program at a particular block and to check how an object to be machined (a workpiece) is machined, the condition of the tools, how a cutting lubricant is applied, and so forth.
The manual pulse mode is also used during the setup stage prior to the automatic operation. When the manual pulse mode is selected, the operator initially operates the operation panel so as to select the spindle and the tool post to be moved, and to select a multiplier that represents a movement amount of the spindle or the tool post per unit revolution of the handwheel. After that, when the operator rotates the handwheel for the manual pulse generator at a desired speed in a normal direction or a reverse direction, the NC program is executed in a forward direction or a reverse direction in accordance with the direction and the speed of the rotation of the handwheel, thereby moving the selected spindle or tool post in accordance with the execution of the NC program (for example, refer to Japanese Unexamined Patent Application Publication No. 8-1482).
According to a technique disclosed in Japanese Unexamined Patent Application Publication No. 8-1482, in an automatic operation start/pause mode, an NC unit starts an automatic operation when the rotation of a handwheel for a manual pulse generator is detected to be started and stops the automatic operation when the rotation of the handwheel is detected to be stopped.
The manual pulse mode (and similarly, the automatic operation start/pause mode according to Japanese Unexamined Patent Application Publication No. 8-1482) is useful since the handwheel can be rotated in the following manner. That is, the handwheel can be rotated at a high speed to quickly move the spindle or the tool post when a detailed check is not needed. When a detailed check is desirable for checking interference of a workpiece with a tool or the like, the handwheel can be rotated at a low speed to slowly move the spindle or the tool post to allow checking of the movement. In addition, when the rotation of the handwheel is stopped, the execution of the NC program is also stopped. Thus, the movement of the spindle and the tool post can be stopped. However, it is very likely that the rotation of the handwheel is stopped before the current block of the NC program is finished. It is difficult for the operator to stop the execution of the NC program exactly when the execution of one block is just finished.
To solve this issue, many machine tools allow combined selection of both the manual pulse mode and the single block mode. When both the manual pulse mode and the single block mode are selected, the NC program is executed in a forward direction or a reverse direction in accordance with the rotation of the handwheel for the manual pulse generator and is automatically stopped at the end of the block. This allows the operator to efficiently check the NC program in a production setup.
However, in the above-described example of the related art, when the NC unit is operated with both the manual pulse mode and the single block mode selected, it is required to perform a complicated task in order to restart the operation of the NC unit after the execution of the NC program is automatically stopped at the end of the block. That is, to start the automatically stopped NC unit, two operations, which are pressing of a start button on an operation panel and, after that, rotating of the handwheel for the manual pulse generator, need to be performed. When the start button and the handwheel are provided at locations away from each other, and in particular in such a case where the handwheel is used in such a manner that the handwheel is separated from the operation panel while being connected thereto with a cable, operability in restarting the operation is degraded.